export default {
  props: {
    value: [String, Number],
    row: Object,
    options: Object
  },
  render(h) {
    const { cellOptions } = this.options || {}
    var _opts = {}
    Object.keys(cellOptions).forEach(key => {
      var attribute = cellOptions[key]
      _opts[key] = this.row[attribute]
    })
    return h('em-cell', {
      attrs: Object.assign(_opts, {
        type: 'goods',
        clickable: true
      }),
      on: {
        click: () => {
          this.$emit('click', 'cell')
        }
      }
    })
  }
}
